package com.langfeiyes.pattern.factory.abstr;

public class App {
    public static void main(String[] args) {
        //华为工厂
        ProductFactory hwFactory = FABFactory.createHWFactory();
        //华为系产品
        ComputerProduct hwc = hwFactory.createComputer();  //电脑
        PhoneProduct hwp = hwFactory.createPhone();  //手机
        hwc.computerInfo();
        hwp.phoneInfo();

        //小米工厂
        ProductFactory xmFactory = FABFactory.createXMFactory();

        //小米系产品
        ComputerProduct xmc = xmFactory.createComputer();  //电脑
        PhoneProduct xmp = xmFactory.createPhone();  //手机
        xmc.computerInfo();
        xmp.phoneInfo();

    }
}
